package git.soulbgm.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;

@RestController
public class HelloController {

    @Value("${config.name}")
    private String name;

    private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");

    @GetMapping("hello")
    public String hello() {
        return name + " hello now beijing time " + sdf.format(new Date());
    }

}
